/*
 * Copyright (c) 2006 - 2022, webrx.cn All rights reserved.
 *
 */
package cn.demo;

import java.util.regex.Pattern;
import java.util.stream.DoubleStream;
import java.util.stream.IntStream;
import java.util.stream.Stream;

/**
 * <p>Project: app2022 - Stream2
 * <p>Powered by webrx On 2022-01-26 11:43:41
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Stream2 {
    public static void main(String[] args) {
        //建立方法
        var s1 = IntStream.empty();
        var s2 = DoubleStream.empty();
        var s3 = Stream.of("java", "html");
        var s4 = "java\njavascript\nhtml".lines();
        var pattern = Pattern.compile("\\d+");
        var s5 = pattern.splitAsStream("java24234mysql8html5css3javascript");
        s5.forEach(System.out::println);
        var s6 = Stream.iterate(1, (e -> e + 2)).limit(5);
    }
}
